<!--<?php
include_once PrintEot('header');
if($action=="new" || $action=="edit"){
print <<<EOT
-->
<form name="form" action="$admin_file" method="post" onsubmit="return checkfrm();">
<input type="hidden" name="action" id="action" value="save"/>
<input type="hidden" name="curid" id="curid" value="$curid"/>
<TABLE cellSpacing="0" cellPadding="0" width="100%" border=0 ID="Table22">
	<TBODY>
		<TR >
			<TD class="tittab" BACKGROUND="$imgpath/admin/menu_bg.gif"><strong><img src="$imgpath/admin/view.gif" width="15" height="13" align="absmiddle"> 新增/编辑　系统栏目</strong></TD>
		</TR>
	</TBODY>
</TABLE>
<table cellspacing=0 cellpadding=0 width="100%" border=0 id="Table23">  
    <tbody>
      <tr>
        <td valign=top>
		<div class="addpro">
		<table cellspacing=0 cellpadding=4 width="100%" border=0 align=center id="Table24">
        <tbody>
				<tr>
					<td align=right>标识：</td>
					<td><input type="text" id="code" style="WIDTH: 261px" NAME="code" value="$db_column[code]"></td>
				</tr>
				<tr>
					<td align=right>名称：</td>
					<td><input type="text" id="name" style="WIDTH: 261px" NAME="name" value="$db_column[name]"></td>
				</tr>
				<tr>
					<td align=right>Url：</td>
					<td><input type="text" id="url" name="url" style="WIDTH: 261px" value="$db_column[url]"></td>
				</tr>
				<tr>
					<td align=right>上级：</td>
					<td><div class="select">
						<select name="parent_id">
							<option value="0" selected>作为一级栏目</option>
							$selmodulelist
						</select>
						</div>
					</td>
				</tr>
				<tr>
					<td align=right>简介：</td>
					<td><textarea id="memo" rows="4" cols="30" NAME="memo">$db_column[memo]</textarea></td>
				</tr>
				<tr>
					<td align=right>排序：</td>
					<td><input type="text" id="col_index" name="col_index" style="WIDTH: 261px" value="$db_column[col_index]"/></td>
				</tr>
				<tr>
				<td colspan="2" align="center">
				<input type="submit" id="btnSubmit" value=" 确定 " NAME="btnSubmit">
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
				<input type="button" onclick="history.go(-1);" value=" 取消 ">
				</td>
				</tr>
         
    </tbody>
 </table>
 </div></TD>
  </TR>
 </TBODY>

 </TABLE>
 </form>

<script>
	function checkfrm(){
		if(isEmpty($('code').value)){
			alert('标识不能为空！');
			$('code').focus();
			return false;
		}		
		if(isEmpty($('name').value)){
			alert('栏目名称不能为空！');
			$('name').focus();
			return false;
		}
		if(isEmpty($('col_index').value) || isInteger($('col_index').value) == false){
			alert('排序必须为数字！');
			$('col_index').focus();
			return false;					
		}
		return true;
	}
</script>
<!--
EOT;
}else{
print <<<EOT
-->
<form name="form" action="$admin_file" method="post">
<center>
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
            <td align="left" class="tittab">
                <strong>系统管理 &gt;&gt; 栏目管理</strong>
            </td>
        </tr>
    </table>
    <table id="Table50" border="0" cellpadding="0" cellspacing="1" width="98%" align=center>
        <tr>
            <td align="right" valign="center">
                <table id="Table51" border="0" cellpadding="0" cellspacing="5" height="30">
                    <input id="Hidden1" name="allSelect" type="hidden" value="all" />
                    <tr>
                        <td align="middle" valign="center">
                            <a href="javascript:document.location.reload();">
                                <img align="absMiddle" border="0" height="15" src="$imgpath/admin/reserch.gif" style="text-decoration: underline" width="17" /><span style="color: #547054"> 刷新</span></a>
<!--
EOT;
						if($canadd==true){
							showButton(1,'新增',$admin_file.'&action=new&curpage='.$curpage.$transtr);
						}
						if($candel==true){
							showButton(2,'删除','javascript:ConfirmDel("'.$admin_file.'&action=del'.$transtr.'&curpage='.$curpage.'","此操作不可恢复,确认删除吗？");');
						}
print <<<EOT
-->
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td height="2">
            </td>
        </tr>
    </table>
    <div class="tab">
        <table id="Table52" border="0" cellpadding="3" cellspacing="0" align=center>
            <tr>
                <td align="middle" class="title" height="20" valign="center"> 序号</td>
                <td align="middle" class="title" height="20" valign="center">
                    <input id="Checkbox1" name="as" onclick="allchecked()" type="checkbox" />全选
                </td>
                <td align="middle" class="title" height="20" valign="center">栏目名称</td>
                <td align="middle" class="title" height="20" valign="center">上级栏目</td>                
                <td align="middle" class="title" height="20" valign="center">栏目地址</td>
                <td align="middle" class="title" height="20" valign="center">栏目描述</td>
                <td align="middle" class="title" height="20" valign="center">排序</td>               
                <td align="middle" class="title" height="20" valign="center">编辑</td>
            </tr>
<!--
EOT;
$curidx = ($curpage-1)*$perpage;
$curpageidx = 0;
$showcount = count($db_syscolumnlist); 
foreach($db_syscolumnlist as $syscolumn ){
		$curidx = $curidx+1;
		$curpageidx = $curpageidx+1;
		$cdate = date('Y/m/d H:i:s',$syscolumn[create_time]);
		if($syscolumn[parent_id]==0) $strcolumn = $syscolumn[name];
		else $strcolumn="&nbsp;&nbsp;|-".$syscolumn[name];
print <<<EOT
-->
            <tr height="30" onclick="SwitchTd(this,'click',$curpageidx);" onmouseout="SwitchTd(this,'out',$curpageidx);"
                onmouseover="SwitchTd(this,'over',$curpageidx);" style="cursor: hand">
                <td align="middle" valign="center" width="50px">$curidx </td>
                <td align="middle" class="hei" valign="center" width="50px">
                    <input id="ids" name="ids" type="checkbox" value="$syscolumn[id]" />
                </td>
                <td>&nbsp;$strcolumn</td>
                <td>&nbsp;$syscolumn[parentname]</td>                
                <td align="middle" valign="center">&nbsp;$syscolumn[url]</td>
                <td align="middle" valign="center">&nbsp;$syscolumn[memo]</td>
                <td align="middle" valign="center">&nbsp;$syscolumn[col_index]</td>
                <td align="middle" valign="center">&nbsp;
<!--
EOT;
	showEditButton($syscolumn[id]);
print <<<EOT
-->
                </td>
            </tr>
<!--
EOT;
}print <<<EOT
-->
            
        </table>
    </div>
    <table id="Table1" border="0" cellpadding="0" cellspacing="0" width="98%">
        <tr>
            <td>
                &nbsp;</td>
            <td align="right" height="35">
<!--
EOT;
	showPageBreakInfo($showcount);
print <<<EOT
-->
             &nbsp;</td>
        </tr>
    </table>
    <input type="hidden" id="count" name="count" value="$showcount" />
</center>
</form>
<!--
EOT;
}?>-->